<?php
//+---------------------------------------------------------------------------------------------------------------------
//| 人生是荒芜的旅行，冷暖自知，苦乐在心
//+---------------------------------------------------------------------------------------------------------------------
//| Author:Janmas <janmas@126.com>
//+---------------------------------------------------------------------------------------------------------------------
//| 
//+---------------------------------------------------------------------------------------------------------------------


namespace app\admin\model;


use think\model\Pivot;

class UserRole extends Pivot
{
	protected $name='system_user_role';

	protected $schema = [
		'id' => 'int',
		'admin_id' => 'int',
		'role_id' => 'int',
	];

	public function permession(){
		return $this->hasMany(Permession::class,'role_id','permession_id')->field('permession_id');
	}
}